{% extends "timeline.html" %}
{% block main %}
    {% if user is defined %}
        <div class="profile">
            <div class="shift">
                <div class="bold">
                    <a href="{{ user.profile_image_url_https|replace("_normal", "") }}">
                        <img class="avatar" src="{{ user.profile_image_url_https }}"/>
                    </a>
                    <span>{{ user.screen_name }} ({{ user.name }})</span>
                <span class="small">
                    {% if user.protected %}Protected{% endif %}
                    {% if user.verified %}Verified{% endif %}
                    {% if user.is_translator %}Translator{% endif %}
                    {% if user.contributors_enabled %}Contributed{% endif %}
                    {% if user.followed_by %}Following you{% endif %}
                </span>
                </div>
                <ul class="about">
                    <li>Bio: {{ user.description }}</li>
                    <li>Link: {% if user.url %}<a href="{{ user.url }}">{{ user.url }}</a>{% endif %}</li>
                    <li>Location: {{ user.location }}</li>
                    <li>Joined: {{ render_created_at(user.created_at) }} (~{{ user.tweets_per_day }} tweets per day)
                    </li>
                </ul>
            </div>
            <div class="features">{{ user.statuses_count }} tweets |
                <a href="">{{ user.followers_count }} followers</a> |
                <a href="">{{ user.friends_count }} friends</a> |
                <a href="{{ url_for("user_favorites", screen_name=user.screen_name) }}">{{ user.favourites_count }}
                    favourites</a> |
                <a href="">lists</a>
                {% if user.screen_name != g.screen_name %}|
                    <a href="">Direct Message</a> |
                    {% if user.following %}
                        <a href="{{ url_for("user_unfollow", screen_name=user.screen_name) }}">Unfollow</a> |
                    {% else %}
                        <a href="{{ url_for("user_follow", screen_name=user.screen_name) }}">Follow</a>
                        {% if user.follow_request_sent %}<span class="small">Request Sent</span>{% endif %}|
                    {% endif %}
                    {% if user.blocking %}
                        <a href="{{ url_for("user_unblock", screen_name=user.screen_name) }}">Unblock</a> |
                    {% else %}
                        <a href="{{ url_for("user_block", screen_name=user.screen_name) }}">Block</a> |
                    {% endif %}
                    <a href="{{ url_for("user_reportspam", screen_name=user.screen_name) }}">Report Spam</a>
                {% endif %}
            </div>
        </div>
    {% endif %}
    <div class="timeline">
        {{ super() }}
    </div>
{% endblock main %}